We present a thorough theoretical study of ordering phenomena in nitride ternary alloys GaInN, AlInN, and AlGaN. Using the Monte Carlo approach and energetics based on the Keating model we analyze the influence of various factors on ordering in bulk crystals and epitaxial layers. We characterize the degree of both short range order (SRO) and long ranger order (LRO) for different compositions, temperatures and for substrates associated with different epitaxial strain. For the description of the SRO the Warren-Cowley parameters related to the first four coordination shells are used. The LRO is detected by means of the introduced sim-LRO parameter, based on the Bragg-Williams approach. The description of the observed long-range ordering patterns and conditions for their occurrence follows.